package com.leo.blog.dto;

import java.util.List;

import com.leo.blog.entity.Blog;
import com.leo.blog.enums.BlogStateEnum;

public class BlogExecution {
	//结果状态
	private int state;
	//状态标识
	private String stateInfo;
	//博客数量
	private int count;
	//操作的blog(增删改博客列表的时候使用)
	private Blog blog;
	//(查询列表的时候使用)
	private List<Blog> blogList;
	
	private List<?> blogList2;
	private int type;
		
	//构造函数
	public BlogExecution() {
			
	}
		
	//操作失败的时候使用的构造器
	public BlogExecution(BlogStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}
		
	//操作成功的时候使用的构造器
	public BlogExecution(BlogStateEnum stateEnum, Blog blog) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.blog = blog;
	}
		
	//操作成功的时候使用的构造器
	public BlogExecution(BlogStateEnum stateEnum, List<Blog> blogList) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.blogList = blogList;
	}
	
	//操作成功的时候使用的构造器
	public BlogExecution(BlogStateEnum stateEnum, List<?> blogList2, int type) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.blogList2 = blogList2;
		this.type = type;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public Blog getBlog() {
		return blog;
	}

	public void setBlog(Blog blog) {
		this.blog = blog;
	}

	public List<Blog> getBlogList() {
		return blogList;
	}

	public void setBlogList(List<Blog> blogList) {
		this.blogList = blogList;
	}

	public List<?> getBlogList2() {
		return blogList2;
	}

	public void setBlogList2(List<?> blogList2) {
		this.blogList2 = blogList2;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
	
	

}
